<template>
  <el-row :gutter="20" class="ne-line">
    <!-- <el-col :span="2" v-for="(item, index) in data" :key="index"
      ><div class="grid-content">

      </div>
    </el-col> -->
      <span
        v-for="(item, index) in data"  :key="index"
          class="u-tabs-btn"

          @click="tabsChange(index)"
          :class="{ current: currentIndex == index }"
          > {{ item.name }}</span
        >
  </el-row>
</template>

<script>
export default {
  name: "TabBtn",
  props: {
    data: {
      type: Array,
      default() {
        return [];
      },
    },
    currentIndex: {
      type: Number,
      default: 0,
    },
  },
  data() {
    return {};
  },
  components: {},
  created() {},
  mounted() {},
  methods: {
    tabsChange(index) {
      this.$emit("tabsChange", index);
    },
  },
};
</script>
<style lang="scss" scoped>
.ne-line{
  border-bottom: .01rem solid #E5E7EC;
}
.u-tabs-btn {
  text-align: center;
  display: inline-block;
  list-style: none;
  color:#333333;
  font-size: $fontSize_v1;
  padding: 0.1rem 0.2rem;
  cursor: pointer;

}
.current {
  // background-color: $blue;
  color: $blue;
  border-bottom: 2px solid $blue;
}
</style>
